<@page.html title="团操预约">
<script type="text/javascript">
  function cancel(id) {
    if(window.confirm("确定要取消预约吗?"))
      getJson("_cancel?id="+id, cancelRet);
  }
  function cancelRet(data) {
    window.alert(data.msg);
    if(data.ret) window.location.reload();
  }
</script>
<table class="list">
  <tr>
    <th width="15%">姓名</th>
    <th width="15%">手机号</th>
    <th width="22%">预约时间</th>
    <th width="22%">上课时间</th>
    <th width="10%">状态</th>
    <th>操作</th>
  </tr>
  <#if list??><#list list as c>
  <tr<#if c_index%2==1> class="line2"<#else> class="line1"</#if>>
    <#if c.memberType="1"><td class="member"><a href="javascript:mbinfo('${c.memberCode!}');">${c.custName!}</a></td><#else><td class="left" style="padding-left:25px;">${c.custName!}</td></#if>
    <td>${c.mobile!}</td>
    <td>${c.bespeakDate?string("yyyy-MM-dd HH:mm")!}</td>
    <td>${c.classTime?string("yyyy-MM-dd HH:mm")}</td>
    <td><@value type="bespeakStatus" key="${c.status!}"/></td>
    <td class="oper"><#if c.status=2 && canCancel?? && canCanc??><a class="apply" href="javascript:cancel('${c.autoId!}');">取消</a></#if></td>
  </tr>
  </#list></#if>
</table>
<div class="button"><#if canBesp??><input type="button" value="预 约" onclick="window.location='add?id=${table.classId!}';"></#if>
  <#if canPrint??><input type="button" value="打印" onclick="window.open('print?id=${table.classId!}');"></#if></div>
</@page.html>